package com.jiaquyun.jcyx.jetpack.api

import com.jiaquyun.jcyx.base.BaseManager
import com.module.lemlin.http.HttpResponseData
import rxhttp.RxHttp
import rxhttp.await

class ShopsRepository : BaseManager() {

    /**
     * 门店列表
     * */
    suspend fun shopsList(
        lng: String, lat: String
    ): HttpResponseData = RxHttp.postForm("/api/shops/shop_list")
        .add("lng", lng)
        .add("lat", lat)
        .await()

    /**
     * 门店信息
     * */
    suspend fun shopsInfo(id: String): HttpResponseData =
        RxHttp.postForm("/api/shops/shop_info")
            .add("id", id)
            .await()
}